package org.example.scala.model

//Movie数据集
//电影id：mid，电影名称：name，详情描述：descri，时长：timelong，发行时间：issue，
// 拍摄时间：shoot，语言：language，类型：genres，演员表：actors，导演：directors
case class Movie(mid: Int, name: String, descri: String, timelong: String, issue: String, shoot: String, language: String, genres: String, actors: String, directors: String)

//Rating数据集
//用户id：uid，电影id：mid，电影评分：score，评价时间：mid
case class MovieRating(uid: Int, mid: Int, score: Double, timestamp: Long)

//Tag
//用户id：uid，电影id：mid，电影标签：tag，评价时间：mid
case class Tag(uid: Int, mid: Int, tag: String, timestamp: Long)

//把mongo和es的配置封装成样例类

/**
 * MongoDB的连接配置
 *
 * @param uri MongoDB连接
 * @param db  MongoDB数据库
 */
case class MongoConfig(uri: String, db: String)

/**
 * ES的连接配置
 *
 * @param httpHosts      http主机列表，逗号分割
 * @param transportHosts transport主机列表，逗号分割
 * @param index          需要操作的索引
 * @param clustername    集群名称，默认
 */
case class ESConfig(httpHosts: String, transportHosts: String, index: String, clustername: String)

//推荐
case class Recommendation(rid: Int, r: Double)

//用户的推荐
case class UserRecs(uid: Int, recs: Seq[Recommendation])

//电影的相似度
case class MovieRecs(mid: Int, recs: Seq[Recommendation])

/**
 * 电影类别的推荐
 *
 * @param genres 电影的类别
 * @param recs   Top10的电影的集合
 */
case class GenresRecommendation(genres: String, recs: Seq[Recommendation])